var iframe = document.getElementById('iframe');
var vm = new Vue({
	el:'#index',
	created(){
		this.route();
		router.render();	
		element.render();

	},
	methods:{
		route(){
			router.map('/user',function(){
				iframe.setAttribute('src','user/user.html')
			}),
			router.map('/role',function(){
				iframe.setAttribute('src','role/role.html')
			}),
			router.map('/permission',function(){
				iframe.setAttribute('src','permission/permission.html')
			}),
			router.map('/authorization',function(){
				iframe.setAttribute('src','authorization/authorization.html')
			}),
			router.map('/food',function(){
				iframe.setAttribute('src','food/food.html')
			}),
			router.map('/foodType',function(){
				iframe.setAttribute('src','foodType/foodType.html')
			}),
			router.map('/producer',function(){
				iframe.setAttribute('src','producer/producer.html')
			}),
			router.map('/productCode',function(){
				iframe.setAttribute('src','productCode/productCode.html')
			}),
			router.map('/brand',function(){
				iframe.setAttribute('src','brand/brand.html')
			}),
			router.map('/storeMethod',function(){
				iframe.setAttribute('src','storeMethod/storeMethod.html')
			}),
			router.map('/taste',function(){
				iframe.setAttribute('src','taste/taste.html')
			}),
			router.map('/expire',function(){
				iframe.setAttribute('src','expire/expire.html')
			}),
			router.map('/unit',function(){
				iframe.setAttribute('src','unit/unit.html')
			}),
			router.map('/site',function(){
				iframe.setAttribute('src','site/site.html')
			}),
			router.map('/subject',function(){
				iframe.setAttribute('src','subject/subject.html')
			}),
			router.map('/event',function(){
				iframe.setAttribute('src','event/event.html')
			}),
			router.map('/uri',function(){
				iframe.setAttribute('src','uri/uri.html')
			}),
			router.map('/hello',function(){
				iframe.setAttribute('src','hello.html')
			})
		},
		logout(){
			$.post(baseURL+"/logout")
		},
		menuShrink(){
			console.log("test")
			var isShow = true;
			$('.layui-icon-shrink-right').click(function(){
				
			})
		}
	}
})